package com.niiwoo.civet.account.dao.mapper;

import com.niiwoo.civet.account.dao.entity.BankCard;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * Created by DELL on 2017/11/8.
 */
@Component
public interface BankCardMapperExt extends BankCardMapper {

    /**
     * 查询普通用户（集团账户）当前有效卡
     * @param userId
     * @return
     */
    BankCard selectSimpleUserBankCard(@Param("userId") String userId);

    /**
     * 查询机构用户（非集团账户）当前有效卡
     * @param accountId
     * @return
     */
    BankCard selectOrgUserBankCard(@Param("accountId")Long accountId);

    /**
     * &
     * 查询所有借款人银行卡
     *
     * @return
     */
    List<BankCard> selectBorrowerUserBankCard();

    int batchInsertTempUserExport(List<Map<String,Object>> recordList);

    int insertTempUserExport(Map<String,Object> record);
}
